package com.len.base;

import com.len.util.ReType;
import org.apache.ibatis.session.RowBounds;

import java.io.Serializable;
import java.util.List;

/**
 * @author zhuxiaomeng
 * @date 2017/12/13.
 * @email 154040976@qq.com
 * 通用service层
 */
public interface BaseService<E, K extends Serializable> {

    List<E> select(E e);

    List<E> selectAll();

    List<E> selectByIds(String ids);

    int selectCount(E e);

    int deleteByPrimaryKey(K id);

    int insert(E e);

    int insertSelective(E e);

    int updateByPrimaryKeySelective(E e);

    int updateByPrimaryKey(E e);

    List<E> selectListByPage(E e);

    int deleteByPrimaryKey(Object o);

    int delete(E e);

    boolean existsWithPrimaryKey(Object o);

    E selectByPrimaryKey(Object o);

    E selectOne(E e);

    int deleteByIds(String s);

    int insertList(List<E> list);

    int insertUseGeneratedKeys(E e);

    int deleteByExample(Object o);

    List<E> selectByExample(Object o);

    int selectCountByExample(Object o);

    E selectOneByExample(Object o);

    int updateByExample(E e, Object o);

    int updateByExampleSelective(E e, Object o);

    List<E> selectByExampleAndRowBounds(Object o, RowBounds rowBounds);

    List<E> selectByRowBounds(E e, RowBounds rowBounds);

    ReType show(E e, int page, int limit);

    ReType getList(E e, int page, int limit);

    String showAll(E e);
}
